﻿using System;

class PointWithinCircleOutOfRectangle

        // Write an expression that checks for given point (x, y) if it is within the circle K( (1,1), 3) and out of the rectangle R(top=1, left=-1, width=6, height=2).

{
    static void Main()
    {
        Console.Write("Enter the X coordinates: ");
        double x = double.Parse(Console.ReadLine());
        Console.Write("Enter the Y coordinates: ");
        double y = double.Parse(Console.ReadLine());
        bool withinCircle = ((x - 1) * (x - 1) + (y - 1) * (y - 1)) <= 9;
        bool withinRectangle = ((-1 <= x) && (x <= 5)) && ((-1 <= y) && (y <= 1));
        Console.Write("The point with the given coordonates is... \n");
        Console.Write(withinCircle ? "within the circle and " : "outside of the circle and ");
        Console.WriteLine(withinRectangle ? "within the rectangle." : "outside of the rectangle.");
    }
}
